<template>
  <div>
    用户名<input type="text" v-model="username">
     密码<input type="text"  v-model="password">
     <button @click="add">新增</button>
  </div>
</template>

<script>
export default {
    data(){
        return{
            username:'',
            password:"",
        }
    },
    methods:{
        async add(){
            let username = this.username
            let password = this.password
            await this.$http.post(this.$api.userinfos,{
            username,password
        })

        }
    }
}
</script>

<style>

</style>